const http = require('http');
const urlFormatter = require('url');  //url使用太多，使用urlFormatter，防止冲突
http.createServer(function (req, res) {
    const obj =urlFormatter.parse(req.url,true);
    const getData=obj.query;
    console.log(getData); //{ user: '1', pass: '1' }
    res.write('aa');
    res.end();
}).listen(8080)